<?php


/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

// find the controller name
	if($controller = HelpDeskRequest::getVar( 'controller', HelpDeskRequest::getVar( 'section', strtolower('HelpDesk') ) ) ) {
		$controller = strtolower( $controller );
		HelpDeskRequest::setVar( 'section', $controller );
		$path = JPATH_COMPONENT_ADMINISTRATOR.DS."views".DS."_toolbars".DS."{$controller}.php";
		if (file_exists($path)) {
			require_once $path;
		}
	}
	
class HelpDeskToolbarHtml extends HelpDeskHelperToolbar
{
	/**
	 * 
	 * @return unknown_type
	 */
	function defineField() 
	{
		mosMenuBar::startTable();
		mosMenuBar::spacer();
		mosMenuBar::custom('switch_require', "../../components/"._THISCOMPONENT."/images/required.png", "../../components/"._THISCOMPONENT."/images/required.png", HelpDeskText::_('Require'), true);
		mosMenuBar::spacer();
		mosMenuBar::custom('switch_define', "switch_f2.png", "switch_f2.png", HelpDeskText::_('Switch'), true);
		mosMenuBar::spacer();
		mosMenuBar::cancel('cancel', HelpDeskText::_('Close') );
		mosMenuBar::endTable();
	}
	
	/**
	 * 
	 * @return unknown_type
	 */
	function viewList() 
	{
		mosMenuBar::startTable();
		mosMenuBar::deleteList();
		mosMenuBar::spacer();
		mosMenuBar::custom('switchmany', "switch_f2.png", "switch_f2.png", HelpDeskText::_('Followup'), true);
		mosMenuBar::spacer();
		mosMenuBar::custom('selectuser', "new_f2.png", "new_f2.png", HelpDeskText::_('New'), false);
		mosMenuBar::endTable();
	}
	
	/**
	 * 
	 * @return unknown_type
	 */
	function viewTicket() 
	{
		mosMenuBar::startTable();
		mosMenuBar::custom( 'remove', "delete_f2.png", "delete_f2.png", HelpDeskText::_( "Delete" ), false );
		mosMenuBar::endTable();
	}	
}